package com.my.mall.manage.goods.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.my.mall.manage.goods.vo.category.GoodsCategoryVo;
import com.my.mall.manage.goods.vo.image.GoodsImageManageVo;
import com.my.mall.manage.goods.vo.info.GoodsInfoVo;
import com.my.mall.manage.goods.vo.sold.GoodsSoldManageVo;

public interface GoodsManageDao {

	List<GoodsCategoryVo> selectCategoryList(@Param("topId") int topId);

	int updateCategory(@Param("id") int id, @Param("categoryName") String categoryName, @Param("topId") int topId,
			@Param("imgId") int imgId);

	int saveCategory(@Param("categoryName") String categoryName, @Param("topId") int topId, @Param("imgId") int imgId);

	GoodsCategoryVo getCategory(int id);

	int delCategory(int id);

	List<GoodsInfoVo> selectInfoList(@Param("iDisplayStart") int iDisplayStart,
			@Param("iDisplayLength") int iDisplayLength);

	int selectInfoCount();

	int updateInfo(@Param("id") int id, @Param("categoryID") int categoryID, @Param("name") String name,
			@Param("title") String title, @Param("synopsis") String synopsis, @Param("isBest") int isBest,
			@Param("isHot") int isHot, @Param("isNew") int isNew, @Param("isFree") int isFree, @Param("sell") int sell,
			@Param("bestCount") int bestCount, @Param("mediumCount") int mediumCount, @Param("badCount") int badCount);

	int saveInfo(@Param("categoryID") int categoryID, @Param("name") String name, @Param("title") String title,
			@Param("synopsis") String synopsis, @Param("isBest") int isBest, @Param("isHot") int isHot,
			@Param("isNew") int isNew, @Param("isFree") int isFree, @Param("sell") int sell,
			@Param("bestCount") int bestCount, @Param("mediumCount") int mediumCount, @Param("badCount") int badCount);

	GoodsInfoVo getInfo(int id);

	GoodsInfoVo getInfoByGoodsName(String GoodsName);

	int delInfo(int id);

	int updateShelves(@Param("id") int id, @Param("favorable") String favorable, @Param("shopPrice") Double shopPrice,
			@Param("costPrice") Double costPrice, @Param("inventory") int inventory, @Param("warning") int warning,
			@Param("isShelves") int isShelves);

	int saveShelves(@Param("favorable") String favorable, @Param("shopPrice") Double shopPrice,
			@Param("costPrice") Double costPrice, @Param("inventory") int inventory, @Param("warning") int warning,
			@Param("isShelves") int isShelves);

	List<GoodsSoldManageVo> selectSoldInfoList(@Param("iDisplayStart") int iDisplayStart,
			@Param("iDisplayLength") int iDisplayLength);

	int selectSoldInfoCount();

	int updateImage(@Param("id") int id, @Param("goodsId") int goodsId);

	List<GoodsImageManageVo> selectImageInfoList(@Param("goodsId") int goodsId);

	int delImg(int id);
}
